package com.code.zg.news.di.module;

import com.code.zg.news.app.App;
import com.code.zg.news.model.http.RetrofitHelper;
import com.code.zg.news.utils.manager.ActivityManager;

import javax.inject.Singleton;

import dagger.Module;
import dagger.Provides;

/**
 * Created by zhanggang on 2017/2/22.
 */
@Module
public class AppModule {
    private final App app;

    public AppModule(App app){
        this.app=app;
    }

    @Provides
    @Singleton
    public App getContext(){
        return app;
    }
    @Provides
    @Singleton
    public RetrofitHelper getRetrofitHelper(){
        return new RetrofitHelper();
    }
    @Provides
    @Singleton
    public ActivityManager getAvtivityManager(){
        return ActivityManager.getInstance();
    }
}
